<?php require_once('../src/session_start.inc.php'); ?>
<?php
require_once('../src/define.inc.php');
require_once('../src/functions.php');

if (isset($_POST) && !empty($_POST))
{
	$errors = treatContactForm($_POST);
	if (empty($errors))
	{
		if (sendContactMail($_POST)) {
			header('Location: message_confirm.php');
		} else {
			$error = ERROR_MSG;
			log_error("L'envoi du formulaire de CONTACT n'a pas pu se faire. Données à envoyer :" . npr($_POST));
		}
	}
}
?>
<?php $page='contact'; require_once('../layout/header.php'); ?>

<div id="leftColumn">
	<h2>Page de contact</h2>
	<p class="justify">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec congue nunc <a href="#">vitae lectus</a>. Donec ipsum felis, dapibus et, mollis eget, egestas at, nulla. Cras suscipit iaculis nisl.</p>
	<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" id="form_contact">
		<?php $short=false; require_once('./contact.inc.php') ?>
		<p class="submit">
			<input type="submit" class="submit" id="submit" name="submit" value="Envoyer" />
		</p>
	</form>
</div>
<div id="rightColumn">
	<h3>Notre réseau d'agence</h3>
	<p><img src="<?php echo IMAGE_DIR . 'contact_carte.jpg' ?>"/></p>
	<p><img src="<?php echo IMAGE_DIR . 'contact_coordonees.jpg' ?>"/></p>
</div>

<?php require_once('../layout/footer.php'); ?>